package com.nuaa.community.service;

import com.nuaa.community.dao.AlphaDao;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * ClassName: AlphaService
 * Package: com.nuaa.community.service
 * Description:
 */
@Service
public class AlphaService {
    @Autowired
    private AlphaDao alphaDao;

    private static final Logger logger = LoggerFactory.getLogger(AlphaService.class);

    public String find(){
        return alphaDao.select();
    }

    // 让该方法在多线程环境下，被异步的调用
    @Async
    public void execute1() {
        logger.debug("execute1");
    }
}
